package clientrequest;

import java.util.Vector;

/**
 * RequestBuddyInvite
 * @brief Sends a buddy request to a character, along with an invitation message.
 * @author brian
 */
public class RequestBuddyInvite extends RequestToServer {

    @Override
    public void send(short requestCode, Vector args) {
       	// Protocol: (String) CharacterName (String) inviteMessage
    	String buddyName = (String) args.get(0);
    	String inviteMessage = (String) args.get(1);
    	
        short sizeofrequest = (short)(4+4*(buddyName.length())+4*(inviteMessage.length()));
        super.writeShort(sizeofrequest);
        super.writeShort(requestCode);
        super.writeString(buddyName);
        super.writeString(inviteMessage);
    }

}
